import org.codert.AopApplication;
import org.codert.dao.A;
import org.codert.dao.Aimpl;
import org.codert.service.DemoService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.math.BigDecimal;

/**
 * @author: TanJingyu
 * @create: 2022-03-10 09:40
 **/
@SpringBootTest(classes = AopApplication.class)
public class AopTestApplication {
    @Autowired
    private DemoService demoService;
    @Autowired
    private A aimpl;

    public static void main(String[] args) {
        String str = " select id, openid, member_id as memberId, product, amount, linker, phone, areaname, product_description as productDescription, DATE_FORMAT(create_time,'%Y-%m-%d %H:%m:%s') as createTime, type, " +
                " verify_status as verifyStatus, verify_person as verifyPerson, DATE_FORMAT(update_time,'%Y-%m-%d %H:%m:%s') as updateTime, project_name as projectName, position, company_name as companyName, " +
                " project_address as projectAddress, product_format as productFormat, DATE_FORMAT(begin_time,'%Y-%m-%d %H:%m:%s') as beginTime, DATE_FORMAT(end_time,'%Y-%m-%d %H:%m:%s') as endTime, payment_method as paymentMethod,  " +
                " budget_money as budgetMoney, product_use as productUse, other_request as otherRequest, supplier_area as supplierArea, brand_demand as brandDemand, " +
                " is_need_installation as needInstallation, is_contain_tax as containTax, purchase_style as purchaseStyle ,purchase_type as purchaseType ,source,review_date as review_date,refer_id as referId  from yfb_purchase_ask where id=#{id} ";
        System.out.println(str);
    }


    @Test
    public void aopTest() {
        System.out.println(aimpl);
    }

    @Test
    public void generateService() {
        System.out.println(demoService.generateDemo());
    }

    @Test
    public void testService() {
        System.out.println(demoService.test());
    }
}

    